﻿using ST.Buz.Base.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ST.Buz.Base.Entity
{
	public partial class Sys_Organization : ISys_TreeItem
	{
		/// <summary>
		/// 区域名称
		/// </summary>
		[NotMapped]
		public string AreaName { get; set; }

		/// <summary>
		/// 区域编码
		/// </summary>
		[NotMapped]
		public string AreaCode { get; set; }

		[NotMapped]
		public string StateText
		{
			get
			{
				return StateNow > 0 ? ((OrganizationState)StateNow).ToString() : "";
			}
		}

		[NotMapped]
		public string PName { get; set; }

		[NotMapped]
		public string Levels { get; set; }

		[NotMapped]
		public List<Sys_Organization> Children { get; set; }
	}
}
